#include "VC_Object.h"


VC_Object::VC_Object(C_Map* map)
{
	m_map = map;
}


VC_Object::~VC_Object()
{
}

void VC_Object::render()
{

	/////////////////////////////////////////////////
	//// coord from amt
	sf::Vector2f abPos = m_map->getPixCoord(m_spacePos.x, m_spacePos.y);

	float perOneSize = *m_map->cellSize() / 150;
	/////////////////////////////////////////////////
	//// inside rect coord
	float relX = perOneSize * pos().x;
	float relY = perOneSize * pos().y;

	m_absolutePos.x = abPos.x + relX;
	m_absolutePos.y = abPos.y + relY;

	glPushMatrix();
	glTranslatef(m_absolutePos.x, m_absolutePos.y, 0.0f);
		renderObject();
	glPopMatrix();
}

void VC_Object::update()
{

}

void VC_Object::renderObject()
{

}
